﻿<?php
include ('includes/functions.php');
include ('includes/front_functions.php');
include ('control/hotel.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="author" content="PNT" />
    <title>Khách Sạn Đà Nẵng</title>
    <link rel="stylesheet" href="css/style.css" type="text/css"  />
	<script type="text/javascript" charset="utf-8" src="js/tiny_mce/tiny_mce.js"></script>
	<script type="text/javascript" charset="utf-8" src="js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery-ui-1.7.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.validate.min.js"></script>
	<script type="text/javascript">
	
    	tinyMCE.init({ 	
    		mode : "textareas",
    		theme : "advanced",
    		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave"
            
    	});
		
    </script>
</head>

<body>
<div id="wrapper">
	<div id="header">
		<ul>
		</ul>
		<div id="logo"><img src="images/banner.jpg" /></div>
		<div id="main-nav">
			<ul>
				<li><a href="index.php#">Trang chủ</a></li>
				<li><a href="index.php?mod=news">Tin tức</a></li>
				<li><a href="index.php?mod=map">Bản đồ</a></li>
				<li><a href="index.php?mod=about">Giới thiệu</a></li>
				<li><a href="index.php?mod=contact">Liên Hệ</a></li>
				<li><a href="index.php?mod=admin">Quản Trị</a></li>
			</ul>
		</div>
	</div><!-- end #header -->
	<div id="main-body">
		<?php 
			$id = "";
			if (isset($_GET['id']))
				$id = $_GET['id'];
			//echo $id;
			getInfoHotel($id);
			getComment($id);
		?>
		<!--
		<div class="message" >	
			<div class="userInfo">	
				<div class="avatar">
					<img src="images/avatar.png"> 
				</div>	
				<h3 class="userName">
					<em class="userTitle">username</em>
				</h3>						
				<span class="arrow"><span></span></span>
			</div>
			<div class="content">										
				<div class="messageContent">		
					Day la noi dung cmt	
				</div>																
				<div class="date">
					Date
				</div>
			</div>
		</div>
		-->
		<div class="clear"></div>
		<div id="comment-box">
			<?php
				$insert = "";
				if (isset($_GET['insert']))
					$insert = $_GET['insert'];
				if(strcmp($insert, "") != 0)
				{
					if(strcmp($insert, "1") == 0)
					//echo '<span style="red">Nhận xét của bạn đã được thêm thành công!</span>';
					echo '<script>alert("Nhận xét của bạn đã được thêm thành công!")</script>';
					if(strcmp($insert, "0") == 0)
					echo '<script>alert("Rất tiếc! Đã có lỗi xảy ra!")</script>';
				}
			?>
			<!--
			<form action="addcomment.php?id=<?php echo $id ?>" method="post">
				Họ tên <br>
				<input type="text" name="name"/><br>
				Nhận xét <br>
				<textarea name="comment_ta" rows="20" cols="40"></textarea>
				<input type="submit" value="Gửi nhận xét"/>
			</form>
			-->
			<h4 class="about-title">Nhận xét của bạn</h4>
			<form id="add-contact" method="post" action="addcomment.php?id=<?php echo $id ?>">
				<p class="contact-row">
					<label class="contact-label">Họ tên</label>
					<input name="name" type="text" class="contact-input required" />
				</p>
				<p class="contact-row">
					<label class="contact-label">Nội dung</label>
					<textarea name="content" class="contact-content required"></textarea>
				</p>
				<p class="contact-row">
					<input type="submit" name="submit" class="button" value="Nhận xét" />
					<input type="reset" name="reset" class="button" value="Hủy" />
				</p>
			</form>
			<script>
			$("#add-contact").validate();
			</script>
		</div>
	</div><!-- end #main-body -->
	<div id="footer">
		Đà Nẵng Hotel </br>
		Copyright © 2013 by Y Duy
	</div><!-- end #<!-- end #main-body -->
</div>

</body>
</html>